package com.natsumehill.ls.service;

import com.alipay.sofa.runtime.api.annotation.SofaService;
import org.springframework.stereotype.Service;

/**
 *  当bean只实现了一个接口时，可以不用interfaceType指明interface
 *  必须将当前类显式注册为bean，可通过@Service注解或者xml配置，否则不能被解析
 */
@Service
@SofaService(interfaceType = SampleJvmService.class, uniqueId = "annotationImpl")
public class SampleJvmServiceAnnotationImpl implements SampleJvmService {
    @Override
    public String message() {
        String message = "Hello, jvm service annotation implementation.";
        System.out.println(message);
        return message;
    }
}
